package com.comm.tmpl.qry;

public class WordDeungrokQry2 {
	public static String selectWord(){
		String strSql = "";
		strSql += "select	'0' chk,\n";
		strSql += "	        seq,\n";
		strSql += "         daneo_nm,\n";
		strSql += "	        yeongmun_seolmyeong,\n";
		strSql += "         hanja_seolmyeong,\n";
		strSql += "         chulcheo,\n";
		strSql += "         bunya\n";
		strSql += "   from  t_daneosajeon\n";
		strSql += "   where  1 = 1\n";
		strSql += "   and  daneo_nm like :daneoNm || '%'\n";
		
		return strSql;
	}
	
	public static String insertWord(){
		String strSql = "";
		strSql += "insert into t_daneosajeon (\n";
		strSql += "                             seq,\n";
		strSql += "                             daneo_nm, \n";
		strSql += "                             yeongmun_seolmyeong, \n";
		strSql += "                             hanja_seolmyeong, \n";
		strSql += "                             chulcheo, \n";
		strSql += "                             bunya \n";
		strSql += "                             ) \n";
		strSql += "                             values ( \n";
		strSql += "                             (select max(nvl(seq,0))+1 from t_daneosajeon), \n"; 
		strSql += "                             :daneoNm,  \n"; 
		strSql += "                             :yeongmunSeolmyeong, \n"; 
		strSql += "                             :hanjaSeolmyeong, \n"; 
		strSql += "                             :chulcheo, \n"; 
		strSql += "                             :bunya \n"; 
		strSql += "                             ) \n"; 
		
		return strSql;
	}
	
	public static String updateWord(){
		String strSql = "";
		strSql += "update	t_daneosajeon \n";
		strSql += "	   set  daneo_nm = :daneo_nm, \n";
		strSql += "	        yeongmun_seolmyeong = :yeongmunSeolmyeong \n";
		strSql += "	        where  1 = 1 \n";
		strSql += "	          and  seq = :seq \n";
		
		return strSql;
	}
	
	public static String deleteWord(){
		String strSql  = "";
		strSql += "delete from t_daneosajeon \n";
		strSql += "      where  1 = 1 \n";
		strSql += "  	   and  seq = :seq \n";
		
		return strSql;
	}
	
	public static String selectWord = "select	'0' chk,	seq,      daneo_nm, 	yeongmun_seolmyeong,	hanja_seolmyeong,	chulcheo,	bunya  from  t_daneosajeon	 where  1 = 1   and  daneo_nm like :daneoNm || '%' ";
	
	public static String insertWord = "insert into t_daneosajeon (	seq, daneo_nm,	yeongmun_seolmyeong, hanja_seolmyeong, chulcheo, bunya ) values ((select max(nvl(seq,0))+1 from t_daneosajeon), :daneoNm, :yeongmunSeolmyeong,	:hanjaSeolmyeong,	:chulcheo, :bunya";
	
	public static String updateWord = "update	t_daneosajeon set  daneo_nm = :daneo_nm, yeongmun_seolmyeong = :yeongmunSeolmyeong where  1 = 1 and  seq = :seq ";

	public static String deleteWord = "delete from t_daneosajeon where  1 = 1 and  seq = :seq";
}
